<header id="page-header"> 
    <h1>Blog</h1> 
</header>

<nav id="shortcuts">
    <ul>
        <li><a href="<?php echo site_url('backend/blog_category/add') ?>" class="add">Yeni Kategori Oluştur</a></li>
    </ul>
    <br class="clear-both" />
</nav>

<div id="content"> 
    
    <?php echo $this->session->flashdata('status') ?>

    <table class="table-list">
        <thead>
            <tr>
                <th>ID</th>
                <th>Kategori Adı</th>
                <th>Toplam Gönderi</th>
                <th>Tarih</th>
                <th>İşlemler</th>
            </tr>
        </thead>

        <tbody>
        	
            <?php if ($result['total_rows'] > 0): ?>
            	
                <?php foreach ($result['rows'] as $row): ?>

                    <tr>
                        <td><?php echo $row->id ?></td>
                        <td><?php echo $row->title ?></td>
                        <td><?php echo $row->numPost ?></td>
                        <td><?php echo format_date($row->date_add) ?></td>
                        <td>
                            <a href="<?php echo site_url("backend/blog_category/edit/{$row->id}") ?>" title="Düzenle"><img src="assets/backend/icon/luna/edit.png" alt="" /></a>
                            <a href="<?php echo site_url("backend/blog_category/delete/{$row->id}") ?>" title="Sil" onclick="return confirm('Bu kategoriyi silerseniz kategoriye ait alt kategorilerde (varsa) silinir. Silme İşlemini Onaylıyormusunuz?')"><img src="assets/backend/icon/luna/trash.png" alt="" /></a>
                        </td>
                    </tr>

                <?php endforeach; ?>
                
            <?php else: ?>

                <tr>
                    <td colspan="5"><div class="notification info">Hiçbir kayıt bulunamadı</div></td>
                </tr>

        	<?php endif; ?>
        </tbody>
    </table>

</div><!-- // #content -->
